<template>
  <div id="app">
    <van-nav-bar
      title="标题"
      left-text="返回"
      left-arrow
      @click-left="backHandle"
    />
    <van-cell title="账号与安全" is-link to="/AccountAndSafe" value="关" />
    <van-cell title="通知" is-link to="/NoticeSetting" />
    <van-cell title="关于影趣" is-link to="/About" />
    <van-cell value="退出登录" id="logout" is-link @click="confirmLogout" />
  </div>
</template>

<script>
import { Dialog } from "vant";
import axios from "axios";
export default {
  data() {
    return {
      token: sessionStorage.getItem("token"),
    };
  },
  methods: {
    backHandle() {
      this.$router.go(-1);
    },
    confirmLogout() {
      Dialog.confirm({
        title: "影趣",
        message: "确认退出码",
        theme: "round-button",
      })
        .then(() => {
          sessionStorage.removeItem("token");
          this.$router.push("/Login");
        })
        .catch(() => {
          // on cancel
        });
    },
  },
};
</script>

<style>
#app {
  background-color: #f5f5daff;
}
.van-cell {
  margin-top: 15px;
  background-color: #fff;
  /* border:1px solid black; */
}
/* #logout{
     cursor: pointer;
}
     */
</style>
